package com.xiao.hao.convertor;


import com.xiao.hao.config.LocalDateTimeConfig;
import com.xiao.hao.entity.XhProductUser;
import com.xiao.hao.req.XhProductUserInsertReq;
import com.xiao.hao.req.XhProductUserUpdateReq;
import com.xiao.hao.resp.XhProductUserResp;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Description 用户用药计划关联表 类型转换
 * @Author xiaohao
 * @Date 2025-03-04 11:24:49
 */
@Mapper(uses = {LocalDateTimeConfig.class}, componentModel = "spring")
public interface XhProductUserConvertor {

    XhProductUserConvertor INSTANCE = Mappers.getMapper(XhProductUserConvertor.class);

    /**
     * 功能描述:
     *
     * @param req
     * @return com.xiao.hao.entity.XhProductUser
     * @author xiaohao
     * @date 2025-03-04 11:24:49
     */
    XhProductUser reqToEntity(XhProductUserInsertReq req);

    /**
     * 功能描述:
     *
     * @param req
     * @return com.xiao.hao.entity.XhProductUser
     * @author xiaohao
     * @date 2025-03-04 11:24:49
     */
    XhProductUser reqToEntity(XhProductUserUpdateReq req);


    /**
     * 功能描述:
     *
     * @param entity
     * @return com.xiao.hao.resp.XhProductUserResp
     * @author xiaohao
     * @date 2025-03-04 11:24:49
     */
    XhProductUserResp entityToResp(XhProductUser entity);

    /**
     * 功能描述:
     *
     * @param list
     * @return java.util.List<com.xiao.hao.resp.XhProductUserResp>
     * @author xiaohao
     * @date 2025-03-04 11:24:49
     */
    List<XhProductUserResp> entityListToRespList(List<XhProductUser> list);
}



